let form = layui.form;
  form.verify({
    same: function(value) {
      let uname = $('.layui-form input[name=password]').val()
      if(value !== uname) {
        return '两次输入的密码不一样'
      }
    }
  })

  $('layui-form').on('submit',function(e) {
    e.preventDefault()
    let fd = $(this).serialize()
    $.ajax({
      type: 'post',
      url: 'admin/users',
      data: 'fd',
      success: function (res) {
        layui.msg(res.message)
      }
    })
  })

 